home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 15256 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.6 KB

  1. Path: news.magicnet.net!usenet
  2. From: catello@magicnet.net (Michael Catello)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Microsoft Visual C++ vs. Borland C++
  5. Date: Thu, 04 Apr 1996 14:41:07 GMT
  6. Organization: MagicNet, Inc.
  7. Message-ID: <4k0n25$p1h@comet.magicnet.net>
  8. References: <4iria4$i76@granite.sentex.net> <4is07r$9cc@news1.h1.usa.pipeline.com> <4jacau$ibg@comet.magicnet.net> <315c2fff.72171602@sqarc.sq.com>
  9. NNTP-Posting-Host: pm2-02.magicnet.net
  10. X-Newsreader: Forte Free Agent 1.0.82
  11.  
  12.  
  13.  
  14. willer@carolian.com (Steve Willer) wrote:
  15.  
  16. >We don't have MSVC4 here, but I do have some legacy code that uses MFC
  17. >2, compiled with BC++. An example of the kinds of differences I'm
  18. >talking about are TDC vs. CDC.  TDC is written as a true
  19. >resource-cleaning class, in that when you create it, it remembers the
  20. >handles of the stock objects it started with. So, if you call
  21. >something like myDC.SelectObject(myBrush), it will automatically clean
  22. >up. Plus, SelectObject is overridden for each TBitmap, TBrush, etc.,
  23. >and it takes a reference to the object rather than a pointer.
  24.  
  25. You're right. Having to Select and de-Select DC objects is a
  26. programming burden and an easy way to get burned. Even knowing this,
  27. just last night I uncovered a leak where, in a report generation
  28. routine, I had incorrectly selected an object which would, after time,
  29. blow up. These idiosyncrasies carried over from the old SDK can be a
  30. nuisance but I strongly believe that by using MFC you will be exposed
  31. to more current Windows technologies instead of waiting for other
  32. compiler vendors to interpret and re-invent what microsoft has done.
  33.  
  34. I enjoyed your detailed and thoughtful response.
  35. Regards,
  36.     
  37.     -Michael
  38.  
  39.  
  40.